DigiLocker Get Issued Documents API
The following document highlights the details of the DigiLocker Get Issued Documents API.
API Description
Objective
The DigiLocker Get Issued Documents API retrieves a list of documents that are issued by the user and is present in their document vault.
| Input | Output |
|---|---|
| A unique reference identifier | A list of documents that are issued by the user and present in their document vault, including document types and URIs |
API URL
https://ind-verify.hyperverge.co/api/digilocker/issuedDocuments
API Endpoint
issuedDocuments
Overview
The DigiLocker Get Issued Documents API is RESTful and uses standard HTTP verbs and status codes. The responses are in JSON format and you should upload all images and files as form-data through a POST request.
Method - POST
Authentication
You need a unique pair of application ID ( appId ) and application key ( appKey ) from HyperVerge to verify your identity for accessing the API.
Headers
| Header | Mandatory / Optional | Description | Input Format |
|---|---|---|---|
| content-type | Mandatory | This parameter defines the media type for the request payload | application/json |
| appId | Mandatory | The application identifier shared by HyperVerge. You can find the details in the dashboard's credentials tab | This should be a unique value |
| appKey | Mandatory | The application key shared by HyperVerge. You can find the details in the dashboard's credentials tab | This should be a unique value |
| transactionId | Optional | A unique identifier for tracking a user journey | This should be both unique and easily associated with the user's journey in your application(s) |
Inputs
The following table provides the details of the parameters required for the DigiLocker Get Issued Documents API's request body:
| Parameter | Mandatory / Optional | Type | Description | Input Format | Default Value |
|---|---|---|---|---|---|
referenceId | Mandatory | string | The unique reference identifier generated in the initial request | Not Applicable | Not Applicable |
Request
The following code snippet demonstrates a standard curl request for the DigiLocker Get Issued Documents API:
curl --location --request POST 'https://ind-verify.hyperverge.co/api/digilocker/issuedDocuments' \
--header 'Content-Type: application/json' \
--header 'appID: <Enter_the_HyperVerge_appId>'\
--header 'appKey: <Enter_the_HyperVerge_appKey>'\
--header 'transactionID: <Enter_the_HyperVerge_transactionID>' \
--data-raw '{
"referenceId": "<Reference_ID>"
}'
Success Responses
The following code snippets demonstrate success responses from the DigiLocker Get Issued Documents API:
- Success Response
{
"status": "success",
"statusCode": "200",
"result": {
"docs": [
{
"docType": "ADHAR",
"uri": "in.gov.uidai-ADHAR-cc16777ca3b4db618240a3db1fb5f69c"
},
{
"docType": "PANCR",
"uri": "in.gov.pan-PANCR-KUYPS6117Q"
}
]
}
}
Success Response Details
The following table outlines the details of the success response from the DigiLocker Get Issued Documents API:
| Parameter | Type | Description |
|---|---|---|
status | string | The status of the request |
statusCode | string | The HTTP status code for the response |
result | object | The JSON object containing the list of issued documents |
result.docs | array | An array of objects containing the document details |
result.docs[].docType | string | The type of document (e.g., "ADHAR", "PANCR") |
result.docs[].uri | string | The unique resource identifier for the document |
Error Responses
The following are some error responses from the DigiLocker Get Issued Documents API:
- Invalid Reference ID
- Empty referenceId
- Missing referenceId
- Missing or Invalid Credentials
- Digilocker Repository Error - 1
{
"status": "failure",
"statusCode": "400",
"error": {
"code": "ER_INVALID_REFID",
"message": "Please try verifying the refId"
}
}
{
"status": "failure",
"statusCode": "400",
"error": {
"code": "ER_REQ_VALIDATE",
"message": "referenceId is not allowed to be empty"
}
}
{
"status": "failure",
"statusCode": "400",
"error": {
"code": "ER_REQ_VALIDATE",
"message": "referenceId is required"
}
}
{
"status": "failure",
"statusCode": "401",
"error": "Missing/Invalid credentials"
}
{
"status": "failure",
"statusCode": "504",
"error": {
"code": "ER_DIGILOCKER_REPO_SERVICE_UNRESPONSIVE",
"message": "Error Connecting to digilocker. Please try again after sometime."
}
}
- Digilocker Repository Error - 2
- Digilocker Repository Error - 3
- Digilocker Repository Error - 4
- Digilocker Repository Error - 5
- Digilocker Repository Error - 6
{
"status": "failure",
"statusCode": "504",
"error": {
"code": "ER_DIGILOCKER_REPO_SERVICE_UNPUBLISHED",
"message": "Error Connecting to digilocker. Please try again after sometime."
}
}
{
"status": "failure",
"statusCode": "504",
"error": {
"code": "ER_DIGILOCKER_REPO_SERVICE_INACTIVE",
"message": "Error Connecting to digilocker. Please try again after sometime."
}
}
{
"status": "failure",
"statusCode": "504",
"error": {
"code": "ER_DIGILOCKER_REPO_SERVICE_CONFIGERROR",
"message": "Error Connecting to digilocker. Please try again after sometime."
}
}
{
"status": "failure",
"statusCode": "504",
"error": {
"code": "ER_DIGILOCKER_REPO_SERVICE_RESPERROR",
"message": "Error Connecting to digilocker. Please try again after sometime."
}
}
{
"status": "failure",
"statusCode": "504",
"error": {
"code": "ER_DIGILOCKER_REPO_SERVICE_EXCEPTION",
"message": "Error Connecting to digilocker. Please try again after sometime."
}
}
Error Response Details
A failure or error response contains a failure status with a relevant status code and error message.
The following table lists all error responses:
| Status Code | Error Message | Error Description | Error Resolution |
|---|---|---|---|
| 400 | referenceId is required | The mandatory referenceId parameter is missing from the request | Provide valid referenceId in the request |
| 400 | referenceId is not allowed to be empty | The referenceId parameter is provided but is empty | Provide a non-empty referenceId in the request |
| 400 | Please try verifying the refId | The provided referenceId is invalid | Verify and provide a valid referenceId |
| 401 | Missing/Invalid credentials | The request is either missing the mandatory appId and appKey combination or has invalid values | Provide valid appId and appKey credentials in the request |
| 504 | Error Connecting to digilocker. Please try again after sometime. | DigiLocker repository service is unresponsive, unpublished, inactive, has a configuration error, response error, or exception | Please try again after sometime or contact the HyperVerge team |